package ar.edu.unlp.info.tesis.database.operator;

import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Expression;

public class BetweenRestriction extends OperatorRestriction {

	Object start, end;

	public BetweenRestriction(String field, Object start, Object end) {
		super();
		this.setField(field);
		this.start = start;
		this.end = end;
	}

	@Override
	public Criterion getExpresion() {
		return Expression.between(this.getField(), start, end);

	}

}
